﻿<%@ Page Title="课程管理" Language="C#" MasterPageFile="~/Manage/ManageWeb.Master" AutoEventWireup="true" CodeBehind="ExperimentManage.aspx.cs" Inherits="无线打分网站.Manage.ExperimentManage" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script type="text/javascript">
        function showdialog(id) {
            var arguments = new Array(id);
            var m = window.showModalDialog("ExperimentEdit.aspx?id=" + id,"","dialogHeight:500px,center:yes,resizable:no,status:no");
            if (m == undefined) {
                m = window.returnValue;
            }
            if (m != null) {               
                //window.location.reload();
                document.getElementById("<%=HiddenField1.ClientID %>").value = "1";
                window.location.href = window.location.href;
                return true;
            }
            else
                return false;
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:Button ID="Button1" runat="server" Font-Size="1.1em" Height="35px" 
    Text="添加新课程" Width="124px" onclientclick="showdialog('')" />
<br />
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
    CellPadding="4" EnableModelValidation="True" Font-Size="0.9em" 
    ForeColor="#333333" Width="100%" onrowdatabound="GridView1_RowDataBound" 
        onrowdeleting="GridView1_RowDeleting">
    <AlternatingRowStyle BackColor="White" />
    <Columns>
        <asp:BoundField DataField="ID" HeaderText="ID" />
        <asp:BoundField DataField="Name" HeaderText="实验名" />
        <asp:BoundField DataField="Room" HeaderText="教室" />
        <asp:BoundField DataField="Times" HeaderText="上课时间" />
        <asp:CheckBoxField DataField="Week1" HeaderText="周一" />
        <asp:CheckBoxField DataField="Week2" HeaderText="周二" />
        <asp:CheckBoxField DataField="Week3" HeaderText="周三" />
        <asp:CheckBoxField DataField="Week4" HeaderText="周四" />
        <asp:CheckBoxField DataField="Week5" HeaderText="周五" />
        <asp:CheckBoxField DataField="Week6" HeaderText="周六" />
        <asp:CheckBoxField DataField="Week7" HeaderText="周日" />
        <asp:ButtonField Text="编辑" ButtonType="Button" />
        <asp:CommandField InsertVisible="False" ShowCancelButton="False" 
            ShowDeleteButton="True" ButtonType="Button" />
    </Columns>
    <EmptyDataTemplate>
        当前无任何课程，请添加新课程
    </EmptyDataTemplate>
    <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
    <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
    <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
    <RowStyle BackColor="#FFFBD6" ForeColor="#333333" HorizontalAlign="Center" />
    <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
</asp:GridView>
    <asp:HiddenField ID="HiddenField1" runat="server" Value="1" />
<br />
</asp:Content>
